Integrand size = 34, antiderivative size = 167 \[ \int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\frac {(A-i B) \operatorname {AppellF1}(1+m,1-n,1,2+m,-i \tan (c+d x),i \tan (c+d x)) (1+i \tan (c+d x))^{-n} \tan ^{1+m}(c+d x) (a+i a \tan (c+d x))^n}{d (1+m)}+\frac {i B \operatorname {Hypergeometric2F1}(1+m,1-n,2+m,-i \tan (c+d x)) (1+i \tan (c+d x))^{-n} \tan ^{1+m}(c+d x) (a+i a \tan (c+d x))^n}{d (1+m)} \]
(A-I*B)*AppellF1(1+m,1-n,1,2+m,-I*tan(d*x+c),I*tan(d*x+c))*tan(d*x+c)^(1+m )*(a+I*a*tan(d*x+c))^n/d/(1+m)/((1+I*tan(d*x+c))^n)+I*B*hypergeom([1+m, 1- n],[2+m],-I*tan(d*x+c))*tan(d*x+c)^(1+m)*(a+I*a*tan(d*x+c))^n/d/(1+m)/((1+ I*tan(d*x+c))^n)
\[ \int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx \]
Time = 0.62 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.324, Rules used = {3042, 4084, 3042, 4047, 25, 27, 152, 150, 4082, 76, 74}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^m (a+i a \tan (c+d x))^n (A+B \tan (c+d x))dx\) |
\(\Big \downarrow \) 4084 |
\(\displaystyle (A-i B) \int \tan ^m(c+d x) (i \tan (c+d x) a+a)^ndx+\frac {i B \int \tan ^m(c+d x) (a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^ndx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A-i B) \int \tan (c+d x)^m (i \tan (c+d x) a+a)^ndx+\frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^ndx}{a}\) |
\(\Big \downarrow \) 4047 |
\(\displaystyle \frac {i a^2 (A-i B) \int -\frac {\tan ^m(c+d x) (i \tan (c+d x) a+a)^{n-1}}{a (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d}+\frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^ndx}{a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^ndx}{a}-\frac {i a^2 (A-i B) \int \frac {\tan ^m(c+d x) (i \tan (c+d x) a+a)^{n-1}}{a (a-i a \tan (c+d x))}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^ndx}{a}-\frac {i a (A-i B) \int \frac {\tan ^m(c+d x) (i \tan (c+d x) a+a)^{n-1}}{a-i a \tan (c+d x)}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 152 |
\(\displaystyle \frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^ndx}{a}-\frac {i (A-i B) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \int \frac {(i \tan (c+d x)+1)^{n-1} \tan ^m(c+d x)}{a-i a \tan (c+d x)}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 150 |
\(\displaystyle \frac {i B \int \tan (c+d x)^m (a-i a \tan (c+d x)) (i \tan (c+d x) a+a)^ndx}{a}+\frac {(A-i B) \tan ^{m+1}(c+d x) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \operatorname {AppellF1}(m+1,1-n,1,m+2,-i \tan (c+d x),i \tan (c+d x))}{d (m+1)}\) |
\(\Big \downarrow \) 4082 |
\(\displaystyle \frac {i a B \int \tan ^m(c+d x) (i \tan (c+d x) a+a)^{n-1}d\tan (c+d x)}{d}+\frac {(A-i B) \tan ^{m+1}(c+d x) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \operatorname {AppellF1}(m+1,1-n,1,m+2,-i \tan (c+d x),i \tan (c+d x))}{d (m+1)}\) |
\(\Big \downarrow \) 76 |
\(\displaystyle \frac {i B (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \int (i \tan (c+d x)+1)^{n-1} \tan ^m(c+d x)d\tan (c+d x)}{d}+\frac {(A-i B) \tan ^{m+1}(c+d x) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \operatorname {AppellF1}(m+1,1-n,1,m+2,-i \tan (c+d x),i \tan (c+d x))}{d (m+1)}\) |
\(\Big \downarrow \) 74 |
\(\displaystyle \frac {(A-i B) \tan ^{m+1}(c+d x) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \operatorname {AppellF1}(m+1,1-n,1,m+2,-i \tan (c+d x),i \tan (c+d x))}{d (m+1)}+\frac {i B \tan ^{m+1}(c+d x) (1+i \tan (c+d x))^{-n} (a+i a \tan (c+d x))^n \operatorname {Hypergeometric2F1}(m+1,1-n,m+2,-i \tan (c+d x))}{d (m+1)}\) |
((A - I*B)*AppellF1[1 + m, 1 - n, 1, 2 + m, (-I)*Tan[c + d*x], I*Tan[c + d *x]]*Tan[c + d*x]^(1 + m)*(a + I*a*Tan[c + d*x])^n)/(d*(1 + m)*(1 + I*Tan[ c + d*x])^n) + (I*B*Hypergeometric2F1[1 + m, 1 - n, 2 + m, (-I)*Tan[c + d* x]]*Tan[c + d*x]^(1 + m)*(a + I*a*Tan[c + d*x])^n)/(d*(1 + m)*(1 + I*Tan[c + d*x])^n)
3.3.18.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x )^(m + 1)/(b*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[m] && (IntegerQ[n] || (GtQ[c, 0] && !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^IntPart [n]*((c + d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]) Int[(b*x)^m*(1 + d* (x/c))^n, x], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[m] && !Integer Q[n] && !GtQ[c, 0] && !GtQ[-d/(b*c), 0] && ((RationalQ[m] && !(EqQ[n, -2 ^(-1)] && EqQ[c^2 - d^2, 0])) || !RationalQ[n])
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^IntPart[n]*((c + d*x)^FracPart[n]/(1 + d*(x/c))^FracPart[n]) Int[(b*x)^m*(1 + d*(x/c))^n*(e + f*x)^p, x], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !IntegerQ[m] && !IntegerQ[n] && !GtQ[c, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[a*(b/f) Subst[Int[(a + x)^(m - 1)*(( c + (d/b)*x)^n/(b^2 + a*x)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d ^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(B/f) Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[ a^2 + b^2, 0] && EqQ[A*b + a*B, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b + a*B)/b Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n, x], x] - Simp[B/b Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^n*(a - b*Tan[ e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]
\[\int \left (\tan ^{m}\left (d x +c \right )\right ) \left (a +i a \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )\right )d x\]
\[ \int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{m} \,d x } \]
integral(((A - I*B)*e^(2*I*d*x + 2*I*c) + A + I*B)*(2*a*e^(2*I*d*x + 2*I*c )/(e^(2*I*d*x + 2*I*c) + 1))^n*((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))^m/(e^(2*I*d*x + 2*I*c) + 1), x)
\[ \int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n} \left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}\, dx \]
\[ \int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{m} \,d x } \]
\[ \int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int { {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \tan \left (d x + c\right )^{m} \,d x } \]
Timed out. \[ \int \tan ^m(c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx=\int {\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n \,d x \]